import { get, post } from '../http'
// 仓库库存
export const listInventorySumByWarehouse = (paylaod: any) => {
  return get('/inventory/v1/inventory/listInventorySumByWarehouse', paylaod)
}
// 货位库存
export const findInventorySumByLocation = (paylaod: any) => {
  return get('/inventory/v1/inventory/findInventorySumByLocation', paylaod)
}
// 批量查询可用货位
export const findAvailableLocation = (paylaod: any) => {
  return post('/inventory/v1/warehouse/findAvailableLocation', paylaod)
}

// 按产品查库存 /inventory/v1/inventory/findInventoryPage
export const findInventoryPage = (paylaod: any) => {
  return get('/inventory/v1/inventory/findInventoryPage', paylaod)
}

// 产品汇总
export const findInventorySum = (paylaod?: any) => {
  return get('/inventory/v1/inventory/findInventorySum', paylaod)
}

// 导入库存
export const importInventory = (paylaod: any) => {
  return post('/inventory/v1/inventory/importInventory', paylaod, { headers: { 'Content-Type': 'multipart/form-data' } })
}

// 批量更新库存单价 /inventory/v1/inventory/updatePriceBatch
export const updatePriceBatch = (paylaod: any) => {
  return post('/inventory/v1/inventory/updatePriceBatch', paylaod)
}

// 批量更新库位 /inventory/v1/warehouse/inventoryChangeLocation
export const inventoryChangeLocation = (paylaod?: any) => {
  return post('/inventory/v1/warehouse/inventoryChangeLocation', paylaod)
}

// 出入库业务类型
export const getInventoryIoType = (paylaod?: any) => {
  return get('/inventory/v1/inventory/getInventoryIoType', paylaod)
}

// 获取出入库记录
export const findInventoryIoPage = (paylaod?: any) => {
  return get('/inventory/v1/inventory/findInventoryIoPage', paylaod)
}

// 出入库统计
export const findInventoryIoSumPage = (paylaod?: any) => {
  return get('/inventory/v1/inventory/findInventoryIoSumPage', paylaod)
}

// 导入更新库存单价 /inventory/v1/inventory/updatePriceImport
export const updatePriceImport = (paylaod?: any) => {
  return post('/inventory/v1/inventory/updatePriceImport', paylaod, { headers: { 'Content-Type': 'multipart/form-data' } })
}

// 库存详情 /inventory/v1/inventory/getInventoryById
export const getInventoryById = (paylaod?: any) => {
  return get('/inventory/v1/inventory/getInventoryById', paylaod)
}

// fba库存查询 /inventory/v1/fba/inventory/findFbaInventoryPage
export const findFbaInventoryPage = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/findFbaInventoryPage', paylaod)
}

// 更新fba库存单价 /inventory/v1/fba/inventory/updateFbaInventoryPrice
export const updateFbaInventoryPrice = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/updateFbaInventoryPrice', paylaod)
}

// 导入更新fba库存单价 /inventory/v1/fba/inventory/importUpdateFbaInventoryPrice
export const importUpdateFbaInventoryPrice = (paylaod?: any) => {
  return post(' /inventory/v1/fba/inventory/importUpdateFbaInventoryPrice', paylaod, { headers: { 'Content-Type': 'multipart/form-data' } })
}

// 获取已授权的店铺列表 /inventory/v1/fba/inventory/listFbaInventoryInitFinishedShop
export const listFbaInventoryInitFinishedShop = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/listFbaInventoryInitFinishedShop', paylaod)
}

// 初始化fba映射仓 /inventory/v1/fba/inventory/fbaInventoryInit
export const fbaInventoryInit = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/fbaInventoryInit', paylaod)
}

// 创建FBA映射仓 /inventory/v1/fba/inventory/createFbaMappedWarehouse
export const createFbaMappedWarehouse = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/createFbaMappedWarehouse', paylaod)
}

// 更新运营人员 /inventory/v1/fba/inventory/updateFbaInventoryOperator
export const updateFbaInventoryOperator = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/updateFbaInventoryOperator', paylaod)
}

// fba出入库统计 /inventory/v1/fba/inventory/findFbaInventoryIoSumPage
export const findFbaInventoryIoSumPage = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/findFbaInventoryIoSumPage', paylaod)
}

// fba库存列表汇总 /inventory/v1/fba/inventory/sumFbaInventoryParam
export const sumFbaInventoryParam = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/sumFbaInventoryParam', paylaod)
}

// 月汇总 /inventory/v1/fba/inventory/report/findLedgerSummaryViewMonthPage
export const findLedgerSummaryViewMonthPage = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/report/findLedgerSummaryViewMonthPage', paylaod)
}

// 月汇总汇总 /inventory/v1/fba/inventory/report/sumLedgerSummaryViewMonthByParam
export const sumLedgerSummaryViewMonthByParam = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/report/sumLedgerSummaryViewMonthByParam', paylaod)
}

// 日汇总 /inventory/v1/fba/inventory/report/findLedgerSummaryViewDayPage
export const findLedgerSummaryViewDayPage = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/report/findLedgerSummaryViewDayPage', paylaod)
}

// 日汇总汇总 /inventory/v1/fba/inventory/report/sumLedgerSummaryViewDayByParam
export const sumLedgerSummaryViewDayByParam = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/report/sumLedgerSummaryViewDayByParam', paylaod)
}

// 分类账明细报告 /inventory/v1/fba/inventory/report/findLedgerDetailViewPage
export const findLedgerDetailViewPage = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/report/findLedgerDetailViewPage', paylaod)
}
// 分类账明细汇总 /inventory/v1/fba/inventory/report/sumLedgerDetailViewByParam
export const sumLedgerDetailViewByParam = (paylaod?: any) => {
  return get('/inventory/v1/fba/inventory/report/sumLedgerDetailViewByParam', paylaod)
}

// 更新月汇总运营
export const updateLedgerSummaryViewMonthSalesman = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/report/updateLedgerSummaryViewMonthSalesman', paylaod)
}
// 更新日汇总运营
export const updateLedgerSummaryViewDaySalesman = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/report/updateLedgerSummaryViewDaySalesman', paylaod)
}
// 更新汇总详情运营
export const updateLedgerDetailViewSalesman = (paylaod?: any) => {
  return post('/inventory/v1/fba/inventory/report/updateLedgerDetailViewSalesman', paylaod)
}
// 根据库存信息查询仓库
export const findWarehouseByInventory = (paylaod?: any) => {
  return get('/inventory/v1/warehouse/findWarehouseByInventory', paylaod)
}
// 库位库存汇总
export const findInventorySumByLocationSum = (paylaod?: any) => {
  return get('/inventory/v1/inventory/findInventorySumByLocationSum', paylaod)
}
// 根据sku和仓库code查询可用库存
export const findInventoryBatch = (paylaod?: any) => {
  return post('/inventory/v1/inventory/findInventoryBatch', paylaod)
}
